package com.lgs.waiting;


/**
 * Created by lgs on 2018/5/4.
 */

public class WaitView {

    public static void startLoading(String message) {
        ProgressLoading progressDialog = ProgressLoading.newInstance();
        progressDialog.setMessage(message)
                .show(progressDialog.getActivity().getSupportFragmentManager(), "");
    }

    public static void stopLoading() {
        ProgressLoading progressDialog = ProgressLoading.newInstance();
        if (progressDialog.getShowsDialog()) {
            progressDialog.dismiss();
            progressDialog = null;
        }
    }
}
